package  
{
  import com.bit101.components.Label;
  import flash.display.Sprite;
	/**
   * ...
   * @author Ivan
   */
  public class PlayerInfoPanel extends Sprite
  {
    
    public function PlayerInfoPanel(player:Player) 
    {
      this.player = player;
      new Label(this, 0, 0, player.name);
      goldLabel = new Label(this, 0, 20, "Gold: " + player.gold);
      player.infoPanel = this;
    }
    
    public function update():void
    {
      goldLabel.text = "Gold: " + player.gold;
    }
    
    private var player:Player;
    private var goldLabel:Label;
    
  }

}